<?php
/**
 * Created by PhpStorm.
 * User: user1
 * Date: 2018/5/21
 * Time: 13:46
 */

namespace app\api\validate;


class ActivityValidate extends BaseValidate
{
    protected $rule = [
        'name' => 'require',
        'image' => 'require',
        'url' => 'require',
        'start_time' => 'require|date',
        'end_time' => 'require|date',
    ];


    protected $message=[
        'name.require' => '活动名称不能为空',
        'image.require' => '请上传活动图片',
        'url.require' => '活动页面链接不能为空',
        'start_time.require' => '请选择活动开始时间',
        'start_time.date' => '活动开始时间格式错误',
        'end_time.require' => '请选择活动结束时间',
        'end_time.date' => '活动结束时间格式错误',
    ];
}